package cn.hxzy.commonUser;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

//(exclude = {SecurityAutoConfiguration.class})
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@MapperScan("cn.hxzy.commonUser.mapper")
@ComponentScan("cn.hxzy")
public class CommonUserApplication {

    public static void main(String[] args) {
        SpringApplication.run(CommonUserApplication.class, args);
    }

//    马奎志

    @Bean
    @LoadBalanced
    public IRule randomRule(){
        return new RandomRule();
    }


}
